<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddBizIdToPayStreams extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('pay_stream', function (Blueprint $table) {
            $table->string('bizId', 64)->default('')->comment('业务订单号')->after('orderId');
            $table->index('bizId', 'idx_bizId');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('pay_stream', function (Blueprint $table) {
            $table->dropColumn('bizId');
        });
    }
}
